package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.MaterialLocationRelationDO;
import xcmg.device.service.vo.basic.MaterialLocationRelationVO;

import java.util.List;

@Mapper
public interface MaterialLocationRelationMapper {
    int deleteByPrimaryKey(String id);

    int insert(MaterialLocationRelationDO record);

    MaterialLocationRelationDO selectByPrimaryKey(String id);

    int updateByPrimaryKey(MaterialLocationRelationDO record);

    List<MaterialLocationRelationVO> list(MaterialLocationRelationVO condition);

    MaterialLocationRelationDO findByAreaCode(@Param("materialNo") String materialNo,@Param("warehouseCode") String warehouseCode, @Param("orgId") String orgId);

    MaterialLocationRelationDO findByLocationCode(@Param("materialNo") String materialNo, @Param("locationCode") String locationCode, @Param("orgId") String orgId);

    String findLocationCode(MaterialLocationRelationVO condition);

    MaterialLocationRelationDO findDefaultLocation(@Param("materialNo") String materialNo,@Param("warehouseCode") String warehouseCode,@Param("areaCode") String areaCode, @Param("orgId") String orgId);
}